package com.pi.pro.xcmg.am.was.edi.infor.dto.req;



import com.pi.pro.xcmg.am.common.XcmgAmConstants;
import com.pi.pro.xcmg.am.was.edi.infor.common.InforWasXcmgExchangeConstants;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 *  接口请求数据
 */
@Getter
@Setter
public class FuncRequestData<T> implements Serializable {

    //接口代码	processCode	string	Y	固定传 P_WCS2WMS_TASK_RESULT
    private String processCode = InforWasXcmgExchangeConstants.FUNC_CODE_TASK_RESULT;;

    //项目号	projectCode	string	Y	固定传 XCMG
    private String projectCode = XcmgAmConstants.CUSTOMER_CODE_XCMG_AM;

    //异步进程ID	asyncProcessTaskId	string		固定值，对接方不用关注
    private Boolean asynchronous=false;

    //系统来源	source	string	Y	系统来源：LKWCS1、LKWCS2、LKWCS3，1期立库目前固定传LKWCS1
    //private String source;

    //封装对象	data	object	Y	用于封装业务参数的对象，请求的业务字段放这里面
    private T data;

    public String toString() {
        StringBuffer buf = new StringBuffer();
        buf.append("{");
        //
        buf.append("processCode:");
        if (this.processCode != null) {
            buf.append(this.processCode);
        } else {
            buf.append("");
        }
        buf.append(",");
        //
        buf.append("projectCode:");
        if (this.projectCode != null) {
            buf.append(this.projectCode);
        } else {
            buf.append("");
        }
        buf.append(",");
        //
        buf.append("asynchronous:");
        if (this.asynchronous != null) {
            buf.append(this.asynchronous);
        } else {
            buf.append("");
        }
        buf.append(",");
        /**
        buf.append("source:");
        if (this.source != null) {
            buf.append(this.source);
        } else {
            buf.append("");
        }
        buf.append(",");
         **/
        //
        buf.append("data:");
        if (this.data != null) {
            buf.append(this.data);
        } else {
            buf.append("");
        }
        buf.append(",");
        buf.append("}");
        return buf.toString();
    }
}
